package com.cjy.service.serviceImpl;

import com.cjy.dao.daoImpl.bookDaoImpl;
import com.cjy.dao.inter.bookDao;
import com.cjy.pojo.Book;
import com.cjy.pojo.Page;
import com.cjy.pojo.User;
import com.cjy.service.inter.bookService;

import java.util.List;

public class bookServiceImpl implements bookService {
    bookDao bookDao = new bookDaoImpl();

    @Override
    public boolean login(User user) {
        return bookDao.login(user);
    }

    @Override
    public int register(User user) {
        return bookDao.register(user);
    }

    @Override
    public int insertBook(Book book) {
        return bookDao.insertBook(book);
    }

    @Override
    public List<Book> selectBook() {
        return bookDao.selectBook();
    }

    @Override
    public List<Book> selectBook(Page page) {
        return bookDao.selectBook(page);
    }

    @Override
    public List<Book> selectBook(String type, String input) {
        return bookDao.selectBook(type, input);
    }

    @Override
    public int deleteBook(Integer id) {
        return bookDao.deleteBook(id);
    }

    @Override
    public int updateBook(Book book) {
        return bookDao.updateBook(book);
    }

    @Override
    public List<Book> selectBook(String type, String input, Page page) {
        return bookDao.selectBook(type, input, page);
    }

    @Override
    public Book selectBook(Integer id) {
        return bookDao.selectBook(id);
    }


}
